﻿@{
    ViewData["Title"] = "Enabling Row Selection";
}

@section ContentHeader {
    <h1>@ViewData["Title"]<small></small></h1>
}

<div class="alert alert-info alert-dismissable alert-dismissible s-sample-info">
    <button type="button" class="close btn-close" data-dismiss="alert" data-bs-dismiss="alert" aria-hidden="true">&times;</button>
    <p>
        Sometimes you might want to let user highlight a grid row. For this, you just need to
        derive your grid from SelectableEntityGrid instead of EntityGrid.
    </p>
    <p>
        You might also apply code in @Html.BasicSamplesSourceFile("/common-features/src/extensions/Modules/Widgets/SelectableEntityGrid.ts") manually to 
        an existing grid class without having to change the base type.
    </p>
    <p>
        This sample also enables the text selection (e.g. copy/paste) in SleekGrid.
        Thanks to @@marcobisio for the original sample in GitHub.
    </p>

    <p class="s-sample-sources"><b>Source Files:</b> 
        @Html.BasicSamplesSourceFile("Index.cshtml"), 
        @Html.BasicSamplesSourceFile("EnablingRowSelectionPage.ts"),
        @Html.BasicSamplesSourceFile("/common-features/src/extensions/Modules/Widgets/SelectableEntityGrid.ts")
    </p>
</div>

<div id="GridDiv"></div>

@Html.ModulePageInit(ESM.EnablingRowSelectionPage)